<?php
$modelObject = new TicketBooked;
if ($type == "course") {
    $loadmodel = TicketBooked::model()->findByAttributes(array('courses_id' => $courseId));
    $addDropdownArray[0] = 'Before the class';
    $addDropdownArray[1] = 'After the class';
} else {
    $addDropdownArray[] = 'Before the class';
    $loadmodel = TicketBooked::model()->findByAttributes(array('classes_id' => $classId));
}
$model = ($loadmodel == '') ? $modelObject : $loadmodel;
?>
<div class="common">                                                      
    <div class="col02 col1">
        <div class="dob flatui">
            <label>Tickets Can Be Booked Upto</label>
            <div class="clear"></div>            
            <?php echo $form->dropDownList($model, 'no_of_days', numberofDays(), array('class' => 'fancySelectBox')); ?>
            <span class="inVal remmarginL">Days</span>
            <?php echo $form->dropDownList($model, 'no_of_hours', numberofDays(), array('class' => 'fancySelectBox')); ?>

            <span class="inVal remmarginL">Hours</span>                                                      		
        </div>
        <div class="clear"></div>
    </div>
    <div class="col02 col2">
        <label>&nbsp;</label>
        <div class="clear"></div>
        <?php echo $form->dropDownList($model, 'action', $addDropdownArray, array('class' => 'fancySelectBox')); ?>

    </div>
    <div class="clear"></div>

</div>  